package com.prft.rms.entity;

// Generated Aug 18, 2009 4:13:41 PM by Hibernate Tools 3.2.1.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * Project generated by hbm2java
 */
@Entity
@Table(name = "PROJECT", catalog = "RMS", uniqueConstraints = @UniqueConstraint(columnNames = "PROJECT_NAME"))
public class Project implements java.io.Serializable {

	private Integer projectId;
	private String projectName;
	private String projectDescription;
	private Date projectStartDate;
	private Date projectEndDate;
	private Character isActive;
	private Character isInternal;
	private Date lastUpdated;
	private Set<AssignmentHis> assignmentHisesForTargetProjectId = new HashSet<AssignmentHis>(0);
	private Set<AssignmentHis> assignmentHisesForProjectId = new HashSet<AssignmentHis>(0);
	private Set<AssignmentHis> assignmentHisesForProjectId_1 = new HashSet<AssignmentHis>(0);
	private Set<AssignmentHis> assignmentHisesForTargetProjectId_1 = new HashSet<AssignmentHis>(0);

	public Project() {
	}

	public Project(String projectName, Date lastUpdated) {
		this.projectName = projectName;
		this.lastUpdated = lastUpdated;
	}

	public Project(String projectName, String projectDescription, Date projectStartDate, Date projectEndDate,
			Character isActive, Character isInternal, Date lastUpdated,
			Set<AssignmentHis> assignmentHisesForTargetProjectId, Set<AssignmentHis> assignmentHisesForProjectId,
			Set<AssignmentHis> assignmentHisesForProjectId_1, Set<AssignmentHis> assignmentHisesForTargetProjectId_1) {
		this.projectName = projectName;
		this.projectDescription = projectDescription;
		this.projectStartDate = projectStartDate;
		this.projectEndDate = projectEndDate;
		this.isActive = isActive;
		this.isInternal = isInternal;
		this.lastUpdated = lastUpdated;
		this.assignmentHisesForTargetProjectId = assignmentHisesForTargetProjectId;
		this.assignmentHisesForProjectId = assignmentHisesForProjectId;
		this.assignmentHisesForProjectId_1 = assignmentHisesForProjectId_1;
		this.assignmentHisesForTargetProjectId_1 = assignmentHisesForTargetProjectId_1;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "PROJECT_ID", unique = true, nullable = false)
	public Integer getProjectId() {
		return this.projectId;
	}

	public void setProjectId(Integer projectId) {
		this.projectId = projectId;
	}

	@Column(name = "PROJECT_NAME", unique = true, nullable = false, length = 100)
	public String getProjectName() {
		return this.projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	@Column(name = "PROJECT_DESCRIPTION")
	public String getProjectDescription() {
		return this.projectDescription;
	}

	public void setProjectDescription(String projectDescription) {
		this.projectDescription = projectDescription;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "PROJECT_START_DATE", length = 10)
	public Date getProjectStartDate() {
		return this.projectStartDate;
	}

	public void setProjectStartDate(Date projectStartDate) {
		this.projectStartDate = projectStartDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "PROJECT_END_DATE", length = 10)
	public Date getProjectEndDate() {
		return this.projectEndDate;
	}

	public void setProjectEndDate(Date projectEndDate) {
		this.projectEndDate = projectEndDate;
	}

	@Column(name = "IS_ACTIVE", length = 1)
	public Character getIsActive() {
		return this.isActive;
	}

	public void setIsActive(Character isActive) {
		this.isActive = isActive;
	}

	@Column(name = "IS_INTERNAL", length = 1)
	public Character getIsInternal() {
		return this.isInternal;
	}

	public void setIsInternal(Character isInternal) {
		this.isInternal = isInternal;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LAST_UPDATED", nullable = false, length = 19)
	public Date getLastUpdated() {
		return this.lastUpdated;
	}

	public void setLastUpdated(Date lastUpdated) {
		this.lastUpdated = lastUpdated;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "projectByTargetProjectId")
	public Set<AssignmentHis> getAssignmentHisesForTargetProjectId() {
		return this.assignmentHisesForTargetProjectId;
	}

	public void setAssignmentHisesForTargetProjectId(Set<AssignmentHis> assignmentHisesForTargetProjectId) {
		this.assignmentHisesForTargetProjectId = assignmentHisesForTargetProjectId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "projectByProjectId")
	public Set<AssignmentHis> getAssignmentHisesForProjectId() {
		return this.assignmentHisesForProjectId;
	}

	public void setAssignmentHisesForProjectId(Set<AssignmentHis> assignmentHisesForProjectId) {
		this.assignmentHisesForProjectId = assignmentHisesForProjectId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "projectByProjectId")
	public Set<AssignmentHis> getAssignmentHisesForProjectId_1() {
		return this.assignmentHisesForProjectId_1;
	}

	public void setAssignmentHisesForProjectId_1(Set<AssignmentHis> assignmentHisesForProjectId_1) {
		this.assignmentHisesForProjectId_1 = assignmentHisesForProjectId_1;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "projectByTargetProjectId")
	public Set<AssignmentHis> getAssignmentHisesForTargetProjectId_1() {
		return this.assignmentHisesForTargetProjectId_1;
	}

	public void setAssignmentHisesForTargetProjectId_1(Set<AssignmentHis> assignmentHisesForTargetProjectId_1) {
		this.assignmentHisesForTargetProjectId_1 = assignmentHisesForTargetProjectId_1;
	}

}
